/**
 *
 */
package anyware.common.restlet;

import org.restlet.resource.Representation;
import org.restlet.resource.Variant;

/**
 * Interface to handle representation<->entity transformation.
 * 
 * @author keke<keke@codehaus.org>
 * @revision $Revision: 111 $
 * @version 0.0.1
 * @see RepresentationHelper
 * @see Representation
 */
public interface RepresentationHandler {
    /**
     * @param representation
     * @return
     */
    Object toEntity(Representation representation);

    /**
     * @param entity
     * @param variant
     * @return
     */
    Representation toRepresentation(Object entity, Variant variant);

}
